Skip to content

fix: handle missing studio in FormattedTitle#45

Open
trek-e wants to merge 1 commit intoDarklyter:mainfrom
trek-e:fix-issue-29
Open

fix: handle missing studio in FormattedTitle#45
trek-e wants to merge 1 commit intoDarklyter:mainfrom
trek-e:fix-issue-29

Conversation

@trek-e
Copy link
Copy Markdown

@trek-e trek-e commented Jan 24, 2026

Summary

Fixes #29

When a scene has no studio set in Stash (studio: null), the FormattedTitle function would crash with TypeError when trying to access data['studio']['name'].

Changes

Added null check using data.get('studio') to gracefully handle scenes without studios. The {studio} placeholder will simply be empty in the formatted title.

Simulation

Scene without studio:
  OLD CODE: CRASH - TypeError: 'NoneType' object is not subscriptable
  NEW CODE: studio = '' (empty string, no crash)

Scene with studio:
  NEW CODE: studio = 'Nubiles' (works correctly)

🤖 Generated with Claude Code

Fixes Darklyter#29

When a scene has no studio set in Stash (studio: null), the FormattedTitle
function would crash with TypeError when trying to access data['studio']['name'].

Added null check to gracefully handle scenes without studios - the {studio}
placeholder will simply be empty in the formatted title.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CRITICAL (agentkit:1018) - Exception in the search function of agent named 'Stash Plex Agent'

1 participant